//
//  JAGAdSplash.h
//  JAGatherAdDemo
//
//  Created by Yc on 2022/4/19.
//

#import "JAGAdBaseAdapter.h"

NS_ASSUME_NONNULL_BEGIN

@class JAGAdSplash;

@protocol JAGAdSplashDelegate <NSObject>

@optional
/// 开屏广告请求成功
- (void)JAGatherSplashAdSuccessLoad:(JAGAdSplash *)splashAd;

/// 开屏广告请求成功
/// @param isTimeout 加载是否超时
- (void)JAGatherSplashAdSuccessLoad:(JAGAdSplash *)splashAd timeout:(BOOL)isTimeout;

/// 开屏广告请求失败
- (void)JAGatherSplashAdFailLoad:(JAGAdSplash *)splashAd error:(NSError *)error;

/// 开屏广告曝光回调
- (void)JAGatherSplashAdExposured:(JAGAdSplash *)splashAd;

/// 开屏广告曝光失败
- (void)JAGatherSplashAdExposuredFailed:(JAGAdSplash *)splashAd error:(NSError *)error;

/// 开屏广告点击回调
- (void)JAGatherSplashAdClicked:(JAGAdSplash *)splashAd;

/// 开屏广告倒计时结束回调
- (void)JAGatherSplashAdCountdownToZero:(JAGAdSplash *)splashAd;

/// 开屏广告点击跳过回调
- (void)JAGatherSplashAdSkiped:(JAGAdSplash *)splashAd;

/// 开屏广告关闭回调
- (void)JAGatherSplashAdClosed:(JAGAdSplash *)splashAd;

/// 开屏广告关闭落地页回调
- (void)JAGatherSplashAdCloseLandingPage:(JAGAdSplash *)splashAd;

/// 广告加载超时
- (void)JAGatherSplashAdDidTimeout:(JAGAdSplash *)splashAd;

@end

@interface JAGAdSplash : JAGAdBaseAdapter

/// 广告方法回调代理
@property (nonatomic, weak) id<JAGAdSplashDelegate> delegate;

/// 广告加载超时时间默认为5s
@property (nonatomic, assign) NSTimeInterval timeout;

/// 自定义底部视图，可以设置一些自定义元素，例如LOGO。如果不设置，广告将按照全屏展示。底部视图最大高度不能超过屏幕高度的25%
@property (nonatomic, strong, nullable) UIView *bottomView;

/// 初始化开屏广告
/// @param placementID 广告位
- (instancetype)initWithPlacementID:(NSString*)placementID;

@end

NS_ASSUME_NONNULL_END
